package com.faithbj.process.impl;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

/**
 * User: xiongyuanwei
 * Date: 12-7-17
 * Time: 上午11:39
 */
public class TaskIdNameProcessInstanceIdTuple implements Externalizable {

    private long taskId;
    private String taskName;
    private long processInstanceId;

    public TaskIdNameProcessInstanceIdTuple() {

    }

    public TaskIdNameProcessInstanceIdTuple(long taskId, String taskName, long processInstanceId) {
        this.taskId = taskId;
        this.taskName = taskName;
        this.processInstanceId = processInstanceId;
    }

    @Override
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeLong(taskId);
        out.writeUTF(taskName);
        out.writeLong(processInstanceId);
    }

    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        taskId = in.readLong();
        taskName = in.readUTF();
        processInstanceId = in.readLong();
    }

    public long getTaskId() {
        return taskId;
    }

    public void setTaskId(long taskId) {
        this.taskId = taskId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public long getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(long processInstanceId) {
        this.processInstanceId = processInstanceId;
    }
}
